import 'package:json_annotation/json_annotation.dart';

import '../user/user.dart';
import 'kh_chat_room_enter_model.dart';
import 'kh_chat_room_seat_model.dart';
import 'kh_chat_user_model.dart';
import 'kh_room_category_model.dart';
part 'kh_chat_room_list_model.g.dart';

@JsonSerializable()
class KHChatRoomListModel {
  /// 麦位数据
  List<KHChatRoomSeatModel>? micList;

  /// 用作房间内预加载
  KHChatRoomEnterModel? cacheEnterModel;
  int? id; //动态id
  String? roomNo; //房间号
  String? liveType;
  String? icon; //房间图标
  String? name; //房间名称
  String? slogan; //房间标语
  String? notice; //房间公告
  bool? isLock; //是否上锁
  bool? hotFlag; //是否火爆
  bool? auditFlag; //审核中
  int? userId; //房主id
  String? ownerMobile; //房主手机号
  int? virtualPeople; //虚拟人数
  bool? isShow; //是否在大厅显示
  bool? isActivate; //是哦福激活
  bool? isAttention; //是哦福激活
  bool? isHot; //是否是热门
  int? sort; //排序号(越大越靠前)
  int? templateId; //房间类型(1派单房，2娱乐房)
  int? categoryId; //游戏分类
  int? roomCategoryId; //房间分类id
  String? remark; //备注
  String? createTime; //创建时间
  String? roomCategoryName; //房间分类名称
  String? roomCategoryColor; //房间分类背景色
  String? statusStr; //房间状态
  String? statusColourStr; //房间状态
  String? categoryHomeIcon; //房间游戏图标
  String? categoryTypeIcon; //房间左上角分类图标url 类似首页”用户头像左上角图标“
  int? people; //人数
  String? password; //密码
  String? micDuration; //默认麦序时长
  int? currentUserRoomRole; //当前房间角色 1.房主 2.管理 3.主持
  int? currentUserRole; //当前房间角色 1.房主 2.管理 3.主持
  String? currentCompereName; //当前房间主持姓名
  String? placeOrderUserName; //点单人
  List<String>? inUserPicList; //在线三人的头像列表
  String? broadcast; //寻人广播
  List<KHRoomCategoryModel>? roomCategoryList; //可以创建的房间类型
  User? roomOpUser; //获取房主头像和昵称
  int? roomStatus; // 2.已封禁
  KHChatRoomListModel? roomInfo;
  String? categoryStr;

  ///聊天室首页改版新增字段
// @property (strong, nonatomic) NSArray<KHHomeBannerModel *> *bannerInfo;
//是普通list还是banner,100是直播数据
  int? roomRefType;
  bool? isCollect; //是否收藏
  bool? isHidden; //是否显示
  String? hostUserName;
  String? hostUserHeadUrl; //主持/房主头像url
  String? roomCode;
  String? roomHonorTag;
  String? roomIcon;
  List? roomInfoTagList;
  List? roomInfoTextTagList;
  String? roomName;
  String? roomShowIcon;
  String? hotRoomIcon;
  String? scoreWeight;
  bool? isHasRedWrap; //是否有红包
  String? redWrapIcon; //房间列表右上角红包图标
  String? assignMsg; //点单信息文案
  bool? canAssign; //能否点单
  int? queueNumber; //排队人数
  bool? isHost; //是否是主持(YES时roomOpUser返回的是主持的信息，NO时返回的是房主的信息)
  String? rightBottomIcon; //聊天室首页房间右下角图片
  String? rightTopIcon; //聊天室首页房间右上角图片
  int? roomVipType; //贵宾类型 0：没有贵宾信息 1：黄金贵宾 2：黑金贵宾 默认0
  String? roomVipImg;
  KHChatUserModel? hostMicUser;
  KHChatUserModel? bossMicUser;

  ///嘉宾用户信息
  int? maleCount; //男生数量
  int? ladyCount; //女生数量
  int? orderStatus; //1 空闲中 2 派单中 3 关闭中
  KHChatUserModel? userInfo; //房主或者主持信息
  List<KHChatUserModel>? micUsers;
  int? playStatus; //房间玩法类型1为点唱中2为婚礼中3为pk中
  String? gameShowStr; //玩法外展
  String? gameShowIoc; //玩法外展图标
  /// k歌用
  String? gameBigShowStr;
// 性别（0：保密；1：男；2：女）
  int? hostGender;
  int? index;
  int? rowHeight;
  bool? fanFlag; //是否在粉丝团
  bool? collectFlag; //是否收藏
  bool? attentionFlag; //是否关注
  bool? isOnline; //是否在线
  String? hostUserId;
  String? songName;
//活动名称
  String? activityName;
//右上角活动图
  String? activityIcon;
  String? collectUrl;
  String? secondActivityIcon;

//需要显示的富文本
// @property (strong, nonatomic) NSAttributedString *rowAttributeStr;

//房间类型
  int? roomTemplateId;
//背景图
  String? backUrl;
//上划有效截至时间
  int? upEffectiveTime;
//下拉有效截至时间
  int? downEffectiveTime;

//房间沉浸式新增
  int? contentHeight;
  int? contentWidth;
//玩法渐变背景
  String? playImg;
  String? secondCategoryImg;
  String? secondPlayImg;
  String? backgroundUrl;
  String? backgroundImg;
  String? speedMatchIconV2;
//查看更多的主播头像
  List? headUrlList;
//是否是查看更多
  bool? isMore;
//直播列表背景图
  String? bgImg;
//随机的数字,用户刷新音波动画
  int? randomNum;
//房间二级分类
  String? secondCategoryId;
  String? secondCategoryName;
//“派单中”
  String? categoryName;
//头像url
  String? headPortraitsUrl;
//房主名称
  String? hostName;
//是否可以开启房间
  bool? openRoom;
//人数
  int? realPeople;
//cell下标
  int? cellTag;
//是否需要带type
  String? rangeTypeStr;
  String? freeShow;

  /// 热度宽度
  int? numberWidth;

  /// 一起K歌/欢乐抢唱新增字段（接口字段）
// 玩法外展
  String? gameCategoryImg;
// 玩法外展渐变图标
  String? gamePlayImg;
// 玩法描述文案
  String? gameDesc;
// 二级页玩法外展
  String? secondGameCategoryImg;
// 二级页玩法外展渐变图标
  String? secondGamePlayImg;
// 玩法音波图
  String? gameVoiceWaveImg;

  /// 一起K歌/欢乐抢唱新增字段（非接口字段）
// 品类图
  String? categoryTypeIcon_new;
// 玩法状态的渐变图
  String? playImg_new;
// 玩法外展
  String? gameShowStr_new;
// 二级页面分类图
  String? secondCategoryImg_new;
// 二级页面玩法状态的渐变图
  String? secondPlayImg_new;
// 玩法音波图
  String? gameShowIoc_new;

  /// 国旗
  String? countryUrl;

  /// 房间类型图标
  String? rogmCategoryUrl;

  KHChatRoomListModel();
  factory KHChatRoomListModel.fromJson(Map<String, dynamic> json) =>
      _$KHChatRoomListModelFromJson(json);
  Map<String, dynamic> toJson() => _$KHChatRoomListModelToJson(this);
}
